(function ($, window, document, undefined) {

$(document).ready(function() {
	
	$klass = $.klass;
	$proto = $klass.prototype;
	$mixin = $.mixin;
	Mixin = $klass.Mixin;
	
	module("Wiki AdvancedUsage");
	
	test("", function() {
		
	// Add/remove methods
		Message = $.klass({
		  init: function( message ) {
			this.message = message;
		  },
		  getMessage: function( ) {
			return this.message;
		  }
		});
		
		ImportantMessage = $.klass( Message, {
		  init: function( message ) {
			this._super( arguments, message + " !" );
		  }
		});
		
		error = new ImportantMessage( "An error occurred" );
		strictEqual(error.getMessage(), "An error occurred !", 'error.getMessage()');  // => "An error occurred !"
		// Ok, that message doesn't look so important.
		
		// So we make the new function that will become our new method:
		getMessage2 = function( ) {
		  return this._super( arguments ).toUpperCase();
		};
		getMessage2._klass = { klass: ImportantMessage, name: "getMessage" };
		
		// Now we add the new method to the class ImportantMessage:
		ImportantMessage.prototype.getMessage = getMessage2;
		
		strictEqual(error.getMessage(), "AN ERROR OCCURRED !", 'error.getMessage()');  // => "AN ERROR OCCURRED !"
		
		// To remove the method, simply do:
		delete ImportantMessage.prototype.getMessage;
		
	// Secure private properties
		Account = $.klass({
		  init: function( privateProps, name ) {
			this.name = name;
		  },
		  _private: {
			secure: true,  // Set this property to true to secure the class.
			setPassword: function( privateProps, password ) {
			  privateProps.password = password;
			},
			login: function( privateProps ) {
			  // send the name and the password to the server
			}
		  }
		});
	});
});

})(jQuery, window, window.document);